/**
 * 分页查询商品列表
 *
 * @param data
 * @returns {*}
 */
function pageList(data) {
    return requests({
        url: '/admin/sysProduct/pageList',
        method: 'post',
        data: data
    })
}
function pageList2(data) {
    return requests({
        url: '/admin/sysProductClass/list',
        method: 'post',
        data: data
    })
}

function pageList3(data) {
    return requests({
        url: '/admin/sysShop/pageList',
        method: 'post',
        data: data
    })
}
/**
 * 查询商品详细
 * @param id
 * @returns {*}
 */
function detail(id) {
    return requests({
        url: '/admin/sysProduct/query/' + id,
        method: 'get'
    })
}

/**
 * 新增商品
 *
 * @param data
 * @returns {*}
 */
function add(data) {
    return requests({
        url: '/admin/sysProduct/add',
        method: 'post',
        data: data
    })
}

/**
 * 修改商品
 *
 * @param data
 * @returns {*}
 */
function update(data) {
    return requests({
        url: '/admin/sysProduct/update',
        method: 'post',
        data: data
    })
}

/**
 *  删除商品
 * @param id
 * @returns {*}
 */
function del(id) {
    return requests({
        url: '/admin/sysProduct/delete/' + id,
        method: 'delete'
    })
}

/**
 * 导出商品
 *
 * @param query
 * @returns {*}
 */
function exportData(data) {
    return requests({
        url: '/admin/sysProduct/export',
        method: 'post',
        data: data
    })
}


function addOrder(data) {
    return requests({
        url: '/admin/sysOrder/add',
        method: 'post',
        data: data
    })
}

function addShopCar(data) {
    return requests({
        url: '/admin/sysShopCar/add',
        method: 'post',
        data: data
    })
}

function addSc(data) {
    return requests({
        url: '/admin/sysCollection/add',
        method: 'post',
        data: data
    })
}
function cancelSc(id) {
    return requests({
        url: '/admin/sysCollection/delete/' + id,
        method: 'post'
    })
}
function addFootHistory(data) {
    return requests({
        url: '/admin/sysFootHistory/add',
        method: 'post',
        data: data
    })
}

function updateProductStatus(data) {
    return requests({
        url: '/admin/sysProduct/update',
        method: 'post',
        data: data
    })
}
